package com.esri.core.map;

import java.io.Serializable;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class FeatureEditResult implements Serializable {
    private static final long serialVersionUID = 1;
    long a;
    String b;
    boolean c;
    FeatureEditError d;

    public long getObjectId() {
        return this.a;
    }

    public String getGlobalId() {
        return this.b;
    }

    public boolean isSuccess() {
        return this.c;
    }

    public FeatureEditError getError() {
        return this.d;
    }

    public static FeatureEditResult fromJson(JsonParser jsonParser) throws Exception {
        if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
            return null;
        }
        FeatureEditResult featureEditResult = new FeatureEditResult();
        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String currentName = jsonParser.getCurrentName();
            jsonParser.nextToken();
            if ("objectId".equals(currentName)) {
                try {
                    featureEditResult.a = jsonParser.getLongValue();
                } catch (JsonParseException unused) {
                    featureEditResult.a = -1L;
                }
            } else if ("globalId".equals(currentName)) {
                featureEditResult.b = jsonParser.getText();
            } else if ("success".equals(currentName)) {
                featureEditResult.c = jsonParser.getBooleanValue();
            } else if ("error".equals(currentName)) {
                featureEditResult.d = FeatureEditError.fromJson(jsonParser);
            } else {
                jsonParser.skipChildren();
            }
        }
        return featureEditResult;
    }

    public String toString() {
        return "FeatureEditResult [objectId=" + this.a + ", globalId=" + this.b + ", success=" + this.c + ", error=" + this.d + "]";
    }
}
